/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class PetBackpack {
    static categoryCode = '010090012';

    static categoryName = '宠物背包';

    device = {};

    opts = {};

    _to = undefined;

    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device;
        this.opts = opts;
        this._to = to;
    }

    get categoryCode() {
        return PetBackpack.categoryCode;
    }

    get categoryName() {
        return PetBackpack.categoryName;
    }

    getCurrentTemperature(params) {
        return command({
            method: 'getCurrentTemperature',
            methodId: 'pDrhrHDn',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getFanLevel(params) {
        return command({
            method: 'getFanLevel',
            methodId: 'p1vZLie9',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getFanSwitch(params) {
        return command({
            method: 'getFanSwitch',
            methodId: 'pGox3y7E',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSwitch(params) {
        return command({
            method: 'getSwitch',
            methodId: 'pZgubjOI',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setFanLevel(params) {
        return command({
            method: 'setFanLevel',
            methodId: 'pUPQDANz',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setFanSwitch(params) {
        return command({
            method: 'setFanSwitch',
            methodId: 'ppAr4CYW',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSwitch(params) {
        return command({
            method: 'setSwitch',
            methodId: 'peH3eUKR',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default PetBackpack;
